#ifndef TERNA_H_INCLUDED
#define TERNA_H_INCLUDED

template<class T,class U,class W>
class terna{
    public:
    T first;
    U second;
    W third;

	terna();
    terna(const terna<T,U,W>& t);
    terna(const T& prim, const U& seg, const W& ter);
    void mostrar(ostream& os) const;
    bool operator==(const terna<T,U,W>& t) const;
    bool operator!=(const terna<T,U,W>& t) const;
    ostream & operator<<(ostream &os) const;
};

template<class T,class U,class W>
ostream& operator<<(ostream& out, const terna<T,U,W>& t){
	t.mostrar(out);
	return out;
}

template<class T,class U,class W>
terna<T,U,W>::terna(){
}

template<class T,class U,class W>
terna<T,U,W>::terna(const T& prim, const U& seg, const W& ter) : first(prim),second(seg),third(ter){
}

template<class T,class U,class W>
void terna<T,U,W>::mostrar(ostream& os) const{
    os << "< " << first << ", " << second << ", " << third << " >";
}


template<class T,class U,class W>
terna<T,U,W>::terna(const terna<T,U,W>& t):
  first(t.first),
  second(t.second),
  third(t.third){}


template<class T,class U,class W>
bool terna<T,U,W>::operator==(const terna<T,U,W>& t) const{

    bool igual;

    igual= ((first ==t.first) && (second == t.second) && (third == t.third));


    return igual;
}
template<class T,class U,class W>
bool terna<T,U,W>::operator!=(const terna<T,U,W>& t) const{

    bool igual;

    igual= !((first ==t.first) && (second == t.second) && (third == t.third));


    return igual;
}


template<class T,class U,class W>
ostream& terna<T,U,W>::operator<<(ostream &os) const{
    this.mostrar(os);
    return os;
}


#endif // terna_H_INCLUDED
